import request from '@/utils/request'

// 查询预约管理列表
export function listReservation(query) {
  return request({
    // url: '/system/reservation/list',
    url: '/system/reservation/waitCheckList',
    method: 'get',
    params: query
  })
}
export function listplatReservation(query) {
  return request({
    url: '/system/reservation/listYt',
    method: 'get',
    params: query
  })
}

// 查询预约管理详细
export function getReservation(id) {
  return request({
    url: '/system/reservation/' + id,
    method: 'get'
  })
}

// 新增预约管理
export function addReservation(data) {
  return request({
    url: '/system/reservation',
    method: 'post',
    data: data
  })
}

// 修改预约管理
export function updateReservation(data) {
  return request({
    url: '/system/reservation/edit',
    method: 'put',
    data: data
  })
}
// 签到限制
export function updateDriver(data) {
  return request({
    url: '/system/reservation/editDriver',
    method: 'put',
    data: data
  })
}
// 待审核取消预约
export function updateCheckReservation(data) {
  return request({
    url: '/system/reservation/editCheck',
    method: 'put',
    data: data
  })
}
// 删除预约管理
export function delReservation(id) {
  return request({
    url: '/system/reservation/' + id,
    method: 'delete'
  })
}
// 预约剩余件数
export function getselectOverCount(query) {
  return request({
    url: '/system/set/selectOverCount',
    method: 'post',
    params:query
  })
}
// 预约注册
export function getRegister(data) {
  return request({
    url: '/system/user/add',
    method: 'POST',
    data:data
  })
}
// export function getRegister(data) {
//   return request({
//     url: '/system/driver/register',
//     method: 'POST',
//     data:data
//   })
// }
// 预约登录
export function getLogin(phone) {
  return request({
    url: '/system/driver/' + phone,
    method: 'get'
  })
}

// 司机预约列表
export function getReservationByPhonelist(query) {
  return request({
    url: '/system/driver/getReservationByPhone',
    method: 'get',
    params: query
  })
}
// 月台状态
export function InfoById(query) {
  return request({
    url: '/system/platform/getInfoById',
    method: 'get',
    params: query
  })
}
// 待审核司机信息
export function carList(query) {
  return request({
    url: '/system/reservation/carList',
    method: 'get',
    params: query
  })
}
// 释放月台界面修改送货件数
export function editSendCount(data) {
  return request({
    url: '/system/reservation/editSendCount',
    method: 'put',
    data: data
  })
}
// 剩余多少
export function getWaitNum(query) {
  return request({
    url: '/system/reservation/getWaitNum',
    method: 'get',
    params: query
  })
}
// 呼叫
export function callDriverList(data) {
  return request({
    url: '/system/reservation/callDriver',
    method: 'POST',
    params:data
  })
}
// 过号
export function outOrderList(data) {
  return request({
    url: '/system/reservation/outOrder',
    method: 'POST',
    params:data
  })
}
// 审单获取信息
export function checkReservationList() {
  return request({
    url: '/system/reservation/getCheckReservation',
    method: 'get',
  })
}
// 锁定
export function lockList(data) {
  return request({
    url: '/system/reservation/lockReservation',
    method: 'get',
    params:data
  })
}
// 签到验证二维码过期
export function isOutTimeData(data) {
  return request({
    url: '/system/reservation/isOutTime',
    method: 'get',
    params:data
  })
}
// 签到信息
export function getselectReservationSign(data) {
  return request({
    url: '/system/reservation/selectReservationSign',
    method: 'post',
    data: data,
  })
}
// 开启窗口
export function WindowStatuslist() {
  return request({
    url: '/system/reservation/getWindowStatus',
    method: 'get',
  })
}
// 挂起信息
export function PendingReservationlist() {
  return request({
    url: '/system/reservation/getPendingList',
    method: 'get',
  })
}
// 挂起按钮
export function pendingReservation(data) {
  return request({
    url: '/system/reservation/pendingReservation',
    method: 'get',
    params:data
  })
}
// 人工呼叫
export function speakingTextData(data) {
  return request({
    url: '/system/reservation/speakingText',
    method: 'post',
    params:data
  })
}
// 呼叫历史
export function listCallAll() {
  return request({
    url: '/system/call/listAll',
    method: 'get',
  })
}
// 标记为大件
export function updateIsBigData(data) {
  return request({
    url: '/system/reservation/updateIsBig',
    method: 'post',
    params:data
  })
}
// 时间段信息列表
export function timeList(data) {
  return request({
    url: '/system/reservation/getTimeList',
    method: 'get',
    params: data,
  })
}
// 送货未履约次数
export function ExecCount(data) {
  return request({
    url: '/system/reservation/getExecCount',
    method: 'get',
    params:data
  })
}
// pc端时间段
export function listTimes() {
  return request({
    url: '/system/time/listTims',
    method: 'get',
  })
}
// pc端时间段预约列表
export function timereportlist(data) {
  return request({
    url: '/system/reservation/getTimeReport',
    method: 'get',
    params:data
  })
}
//图片上传接口
export function uploadImg(data) {
  return request({
    url: '/system/reservation/images',
    method: 'post',
    data:data
  })
}